The present invention relates to industrial sensors and, in particular, to an output circuit for such sensors allowing both current sinking and sourcing load connections.
Electronic sensors may be used to provide input signals, for example, to an industrial controller or the like, such signals allowing the controller to respond to the state of a controlled machine or process, via a stored control program, and to generate outputs to actuators affecting the operation of the machine or process.
One class of industrial sensors provides a switched output that may indicate one of two sensing states, for example, providing a binary “on” or “off” signal to the attached control system. Such switched sensors commonly provide an electrical interface having positive and negative leads through which the sensor may receive power and an output lead through which the sensor indicates its state. The signal on the output lead may adopt one of two interface standards. In a first standard, the output lead during an active state provides a positive voltage with respect to ground permitting an outflow of current to a ground-referenced load. Such sensors have a “current sourcing” interface. In the second standard, the output lead during an active state provides a ground voltage with respect to the positive lead permitting an inflow of current from a positive voltage referenced load. Such sensors have a “current sinking” interface.
In common switched sensor designs, the output of a “sourcing” sensor may be realized with a PNP transistor having its emitter attached to a source of positive voltage and its collector attached to the output lead of the sensor. In contrast, the output of the “sinking” sensor may be realized with an NPN transistor having its emitter attached to ground and its collector attached to the output lead of the sensor.
Both sensor types provide the same data but are fundamentally incompatible with respect to their interface with attached devices. This may require a manufacturer or user to stock multiple models leading to high costs and possible downtime if insufficient stock of the correct type is not available.
It is known to produce a switched sensor having an output that may emulate either a “sinking” or “sourcing” output by providing both transistors in a “push pull” arrangement and activating only the transistor required for the particular interface. The selection of this transistor may be made automatically by measuring the voltage on the output lead of the sensor prior to activation of either transistor. If the sensor is being used by a device that expects a sinking sensor, there will typically be a load connected between the output of the sensor and a positive voltage providing a positive voltage on the sensor output. This positive voltage may be read by a microprocessor while the sensor is being initialized and used to select the sinking mode of operation in which the sensed parameter will activate only the NPN transistor. Conversely if the sensor is being used by a device that expects a sourcing sensor, there will typically be a load connected between the output of the sensor and ground providing a ground voltage on the output of the sensor. This ground voltage may be read by the microprocessor during initialization of the sensor and used to select a sourcing mode of operation and activation of the PNP transistor with changes in sensor state.